package com.qiangesoft.design.creational.singleton;

/**
 * 单例模式
 */
public class Singleton {
    public static void main(String[] args) {
        // 获取单例实例
        HungrySingleton hungrySingleton = HungrySingleton.getInstance();
        LazySingleton lazySingleton = LazySingleton.getInstance();
        InnerClassSingleton innerClassSingleton = InnerClassSingleton.getInstance();
        EnumSingleton enumSingleton = EnumSingleton.INSTANCE;
    }
}